import { createApp } from 'vue';

// global css
// import 'virtual:uno.css'; todo 与打印模块样式冲突
import '@/assets/styles/index.scss';
import 'element-plus/dist/index.css';
import '@myprint/design/styles/index.scss';

// 根组件
import App from './App.vue';
import store from './store';
import router from './router';

// 自定义指令 directive
import directive from './directive';

// 注册插件 plugins
import plugins from './plugins';

// 打印模块
import { createPrint, MyPrinter } from '@myprint/design';

// svg图标
import 'virtual:svg-icons-register';
import ElementIcons from '@/plugins/svgIcon';

// 国际化
import i18n from '@/lang/index';

const app = createApp(App);

app.use(store);
app.use(router);
app.use(i18n);
app.use(ElementIcons);
app.use(plugins);

MyPrinter.initMyPrinter({
  disabledClient: true // 是否禁用客户端连接
});
MyPrinter.setLocale('zhCn');

app.use(createPrint);

directive(app);

app.mount('#app');
